package m.member.order.model;

import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;
import m.member.manage.model.ServeGoods;

@TableMeta(name="to_order_detail",description="订单明细表")
public class OrderDetail extends Model {
    @LinkTableMeta(name="order_oid",table= OrderInfo.class,description="所属订单")
    private OrderInfo order;
    @LinkTableMeta(name="serve_oid",table= ServeGoods.class,description="服务商品")
    private ServeGoods serve;

    @FieldMeta(name = "price",type = FieldType.DOUBLE,description = "单价")
    private Double price;
    @FieldMeta(name = "discount",type = FieldType.INT,description = "优惠比例|%")
    private Integer discount;
    @FieldMeta(name = "num",type = FieldType.DOUBLE,description = "数量")
    private Double num;
    @FieldMeta(name = "total",type = FieldType.DOUBLE,description = "金额")
    private Double total;

    public OrderInfo getOrder() {
        return order;
    }

    public void setOrder(OrderInfo order) {
        this.order = order;
    }

    public ServeGoods getServe() {
        return serve;
    }

    public void setServe(ServeGoods serve) {
        this.serve = serve;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getDiscount() {
        return discount;
    }

    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    public Double getNum() {
        return num;
    }

    public void setNum(Double num) {
        this.num = num;
    }

    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }
}
